﻿
using StructureMap.Configuration.DSL;
using System;
using ZSoftInstagram.DataAccess;
using ZSoftInstagram.DataAccess.Abstractions;
using ZSoftInstagram.Domain.Board;
using ZSoftInstagram.Services;
using ZSoftInstagram.Services.Abstraction;
using ZSoftInstagram.Services.ImagePinProviders;
using ZSoftInstagram.Services.Upload;

namespace ZSoftInstagram.UI.Web.Infrastructure.IOC.Registries
{
    public class PinServiceRegtistry : Registry
    {
        public PinServiceRegtistry()
        {
            this.For(typeof(IPinService))
                  .Use(typeof(ImagePinService))
                    .Ctor<IRepository<ImagePin>>().Is(new SqlRepository<ImagePin>(new ApplicationDbContext()))
                    .Ctor<UploadService>().Is(new UploadService(new DateDirectoryProvider()));
        }
    }
}
